package com.llc.gulimall.order.feign;

import com.llc.common.to.OrderLockStockTO;
import com.llc.common.utils.R;
import com.llc.gulimall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author wangwei
 * 2021/1/21 16:48
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {

    @RequestMapping("/ware/waresku/stock/batch")
    R getSkuStockBatch(@RequestBody List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fare")
    R getFare(@RequestParam("addrId") Long addrId);
    //锁库存
    @PostMapping("/ware/waresku/lock/order")
    R orderLockStock(@RequestBody WareSkuLockVo vo);


    @PostMapping(value = "/ware/waresku/hasStock")
     R getSkuHasStock(@RequestBody List<Long> skuIds);

    @PostMapping("/ware/waresku/lockStock")
    R lockStock(@RequestBody OrderLockStockTO lockStockTO);
}
